Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

Sure try this instead...
~Umberto Nongeroson 20.Jan.04 06:40 PM a Web browser
Domino Designer All Releases Windows 2000


Sub Initialize
On Error Goto ErrorHandler
REM get the current database from the session
Dim ses As New NotesSession
Dim db As NotesDatabase
Dim workspace As New NotesUIWorkspace
Dim picklist As Variant
Dim newDoc As NotesDocument
Dim docToProcess As NotesDocument
Dim col As NotesDocumentCollection

Set db = ses.CurrentDatabase

REM get the unprocessed documents
Set col = db.UnprocessedDocuments

REM process the unprocessed documents
For docCount=1 To col.Count
REM get the document in the collection to process
Set docToProcess = col.GetNthDocument(docCount)

Print "Processing document "+Cstr(docCount) + " of "+Cstr(col.Count)
picklist = workspace.PickListStrings(PICKLIST_CUSTOM, True, "dcoirm1ln/DC/USEPA/US", _
"QS\OversightTest.nsf", "Training Events\by Code", "Select a training event", _
"Please select a course this student attended",2)
If Not Isempty(picklist) Then
Set newDoc = db.CreateDocument
With newDoc
.Form = "Student Record for CEU Course"
Call .ReplaceItemValue("Course_Num", picklist)
'ammend the following line with the proper field name for the student name
.StudentName = docToProcess.StudentName
.ComputeWithForm True,False
.Save True, True
End With
End If

REM update the doc we just processed so we do not process it again
' no need for this only used for agents that run on uprocessed documents
' Call ses.UpdateProcessedDoc(docToProcess)
Next
Exit Sub

ErrorHandler:
Print "Error :: " +Error$+" "+Cstr(Err) + " "+Cstr(Erl)
Exit Sub

End Sub




Help with Script Agent to Create Ne... (~Sven Asafoogen... 20.Jan.04)
. . Sure try this instead... (~Dan Elhipister... 20.Jan.04)
. . . . RE: Sure try this instead... (~Sven Asafoogen... 20.Jan.04)
. . . . . . RE: Sure try this instead... (~Justin Minlute... 20.Jan.04)
. . . . . . . . RE: Sure try this instead... (~Sven Asafoogen... 20.Jan.04)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS